package org.example.util;

import org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;

/**
 * @Author: HAPPY
 * @Project_name: hibernate
 * @Package_name: org.example.util
 * @Date: 2021/9/26 21:21
 */
public class SessionFactoryUtil {
    static SessionFactory sessionFactory;
    static {
        sessionFactory = new Configuration().configure().buildSessionFactory();
    }

    public static SessionFactory getSessionFactory(){
        return sessionFactory;
    }
}
